<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<tiles:insert page="/general/templateLoggedIn.jsp">
	<tiles:put name="title" value="Name Page"/>
	<tiles:put name="nav"/>
	<tiles:put name="content" type="string">
	
		<h2>Previous Data:</h2>
		
		<ol class="tree">
			<li><label for="general">General Information</label><input type="checkbox" id="general" />
				<ol> 
					<li>
						<table>
							<tr><td>First Name:</td><td><c:out value="${sessionScope.applicant.firstName}"/></td></tr>
							<tr><td>Middle Initial:</td><td><c:out value="${sessionScope.applicant.middleInitial}"/></td></tr>
							<tr><td>Last Name:</td><td><c:out value="${sessionScope.applicant.name}"/></td></tr>
							<tr><td>Country of Citizenship:</td><td><c:out value="${sessionScope.applicant.countryOfCitizenship}"/></td></tr>
							<tr><td>Country of Residence:</td><td><c:out value="${sessionScope.applicant.countryOfResidence}"/></td></tr>
						</table>
					</li>
				</ol>
			</li>
		</ol>
		<hr>
		<br>
		
		<h2>Application</h2>
			
		Please type in the information needed regarding the place you live.
			
		<br><br>
				
		<html:form action="/address" focus="street">
			
			<table>
				<tr><td>Street:</td><td><html:text property="street" size="30"/></td></tr>
				<tr><td>City:</td><td><html:text property="city" size="30"/></td></tr>
				<c:choose>
					<c:when test="${sessionScope.applicant.usResidence == true}">
						<tr><td>State:</td><td><html:text property="state" size="30"/></td></tr>
					</c:when>
					<c:otherwise>
						<tr><td>Country Phone Code:</td><td><html:text property="countryPhoneCode" size="4" maxlength="5"/></td></tr>
					</c:otherwise>
				</c:choose>
				<tr><td>ZIP/Postal Code:</td><td><html:text property="zip" size="4" maxlength="5" value=""/></td></tr>
				<tr><td>Area Code:</td><td><html:text property="areaCode" size="4" maxlength="4" value=""/></td></tr>
				<tr><td>Number:</td><td><html:text property="number" size="10" value=""/></td></tr>
				<tr><td colspan="2"><input type="submit" value="Next"></td></tr>
			</table>
			
		</html:form>
		
	</tiles:put>
</tiles:insert>